package tedu.rocketmq.consumer;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;
import tedu.rocketmq.param.TeduUser;

@Component
@RocketMQMessageListener(topic ="user-topic" ,consumerGroup = "abc")
public class TeduUserConsumer implements RocketMQListener<TeduUser>{
    @Override public void onMessage(TeduUser user) {
        System.out.println("接收到消息:"+user);
    }
}
